home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume23 / abc / patch1 < prev    next >
Encoding:
Internet Message Format  |  1991-01-08  |  6.6 KB

  1. Subject:  v23i106:  ABC interactive programming environment, Patch1
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: 3de5c314 60e1ca6a 5252e7c3 c7c31bfe
  5.  
  6. Submitted-by: rsalz
  7. Posting-number: Volume 23, Issue 106
  8. Archive-name: abc/patch1
  9.  
  10. [  The file bint.h was missing.  Oops.  The second of two distribution
  11.    patches that do NOT change the released patchlevel.  --r$  ]
  12.  
  13. #! /bin/sh
  14. # This is a shell archive.  Remove anything before this line, then feed it
  15. # into a shell via "sh file" or similar.  To overwrite existing files,
  16. # type "sh file -c".
  17. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  18. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  19. # Contents:  bint.h
  20. # Wrapped by rsalz@litchi.bbn.com on Thu Dec 20 15:24:30 1990
  21. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  22. echo If this archive is complete, you will see the following message:
  23. echo '          "shar: End of archive."'
  24. if test -f 'bint.h' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'bint.h'\"
  26. else
  27.   echo shar: Extracting \"'bint.h'\" \(5295 characters\)
  28.   sed "s/^X//" >'bint.h' <<'END_OF_FILE'
  29. X/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1988. */
  30. X
  31. X/* interpreter values */
  32. X
  33. X/* Types */
  34. X
  35. X#define Ptn 'T'        /* parsetree */
  36. X#define How 'h'        /* command howto */
  37. X#define Fun '+'        /* function */
  38. X#define Ref 'r'        /* refinement */
  39. X#define Prd 'i'        /* predicate */
  40. X#define Sim 'S'        /* simple location */
  41. X#define Tri '@'        /* trimmed text location */
  42. X#define Tse '['        /* table selection location */
  43. X#define Rangebounds 'B'    /* for range as list_item */
  44. X#define Ind 'p'        /* indirection node for targets and formals */
  45. X
  46. X/************************************************************************/
  47. X/* environment                                */
  48. X/************************************************************************/
  49. X
  50. Xtypedef value envtab;
  51. Xtypedef struct ec{envtab tab; struct ec *inv_env;} envchain;
  52. Xtypedef envchain *env;
  53. X
  54. X/************************************************************************/
  55. X/* parsetrees                                */
  56. X/************************************************************************/
  57. X
  58. Xtypedef value parsetree;
  59. X#define NilTree ((parsetree) Vnil)
  60. X#define Is_parsetree(v) (Type(v) == Ptn)
  61. X#define ValidTree(v) ((v) != NilTree)
  62. X
  63. X/************************************************************************/
  64. X/*                                                                      */
  65. X/* A function or predicate is modelled as a compound consisting of      */
  66. X/* (i)  Zer/Mon/Dya for zero-, mon- or dyadicity;                       */
  67. X/* (ii) If a predefined function, an identifying number, otherwise -1   */
  68. X/* (iii)  If a user-defined function/predicate, its parse-tree          */
  69. X/*                                                                      */
  70. X/************************************************************************/
  71. X
  72. Xtypedef struct {
  73. X    parsetree unit; 
  74. X    char /* bool */ unparsed;
  75. X    char /* bool */ filed; 
  76. X    parsetree code;
  77. X} how;
  78. X
  79. Xtypedef struct {
  80. X    parsetree unit; 
  81. X    char /* bool */ unparsed;
  82. X    char /* bool */ filed; 
  83. X    parsetree code;
  84. X    literal adic; 
  85. X    intlet pre;
  86. X} funprd;
  87. X
  88. X/* The first four fields of hows and funprds must be the same. */
  89. X#define Use (-1) /* funprd.pre==Use for user-defined funprds */
  90. X
  91. X#define How_to(u)  ((how *)Ats(u))
  92. X#define Funprd(f)  ((funprd *)Ats(f))
  93. X
  94. Xtypedef value fun;
  95. Xtypedef value prd;
  96. X
  97. Xfun mk_fun();
  98. Xprd mk_prd();
  99. Xvalue mk_how();
  100. X
  101. X#define Is_howto(v) (Type(v) == How)
  102. X#define Is_function(v) (Type(v) == Fun)
  103. X#define Is_predicate(v) (Type(v) == Prd)
  104. X
  105. X/************************************************************************/
  106. X/* refinements                                */
  107. X/************************************************************************/
  108. X
  109. Xtypedef struct{parsetree rp;} ref;
  110. X#define Refinement(r) ((ref *)Ats(r))
  111. X#define Is_refinement(v) (Type(v) == Ref)
  112. Xvalue mk_ref();
  113. X
  114. X/************************************************************************/
  115. X/*                                                                      */
  116. X/* Locations                                                            */
  117. X/*                                                                      */
  118. X/* A simple location is modelled as a pair basic-identifier and         */
  119. X/*     environment, where a basic-identifier is modelled as a text      */
  120. X/*     and an environment as a pointer to a pair (T, E), where T is a   */
  121. X/*     table with basic-identifiers as keys and content values as       */
  122. X/*     associates, and E is the invoking environment or nil.            */
  123. X/*                                                                      */
  124. X/* A trimmed-text location is modelled as a triple (R, B, C).           */
  125. X/*                                                                      */
  126. X/* A compound location is modelled as a compound whose fields are       */
  127. X/*     locations, rather than values.                                   */
  128. X/*                                                                      */
  129. X/* A table-selection location is modelled as a pair (R, K).             */
  130. X/*                                                                      */
  131. X/************************************************************************/
  132. X
  133. Xtypedef value loc;
  134. X#define Lnil ((loc) Vnil)
  135. X
  136. Xtypedef value basidf;
  137. Xtypedef struct{basidf i; env e;} simploc;
  138. Xtypedef struct{loc R; value B, C;} trimloc;
  139. Xtypedef struct{loc R; value K;} tbseloc;
  140. X
  141. X#define Simploc(l) ((simploc *)Ats(l))
  142. X#define Tbseloc(l) ((tbseloc *)Ats(l))
  143. X#define Trimloc(l) ((trimloc *)Ats(l))
  144. X
  145. Xloc mk_simploc();
  146. Xloc mk_trimloc();
  147. Xloc mk_tbseloc();
  148. X
  149. X#define Is_locloc(v) IsSmallInt(v)
  150. X#define Is_simploc(v) (Type(v) == Sim)
  151. X#define Is_tbseloc(v) (Type(v) == Tse)
  152. X#define Is_trimloc(v) (Type(v) == Tri)
  153. X
  154. X/************************************************************************/
  155. X/* rangebounds                                */
  156. X/************************************************************************/
  157. X
  158. X#define R_LWB(v) ((value) *Field((v), 0))
  159. X#define R_UPB(v) ((value) *Field((v), 1))
  160. X#define Is_rangebounds(v) (Type(v) == Rangebounds)
  161. Xvalue mk_rbounds();
  162. X
  163. X/************************************************************************/
  164. X/* indirection                                */
  165. X/************************************************************************/
  166. X
  167. Xtypedef struct{value val;} indirect;
  168. X#define Indirect(v) ((indirect *)Ats(v))
  169. X#define Is_indirect(v) (Type(v) == Ind)
  170. Xvalue mk_indirect();
  171. X
  172. X/************************************************************************/
  173. END_OF_FILE
  174.   if test 5295 -ne `wc -c <'bint.h'`; then
  175.     echo shar: \"'bint.h'\" unpacked with wrong size!
  176.   fi
  177.   # end of 'bint.h'
  178. fi
  179. echo shar: End of archive.
  180. exit 0
  181. exit 0 # Just in case...
  182.